﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:common="clr-namespace:LaserTag.Common.Controls;assembly=LaserTag.Common"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:LaserTag_Common_Behaviors="clr-namespace:LaserTag.Common.Behaviors;assembly=LaserTag.Common"
             x:Class="LaserTag.Module.AForgeModule.Views.AForgeVideoProcessorSetupView"
             d:DesignHeight="574"
             d:DesignWidth="751.983">
    <UserControl.Resources>
    	<ResourceDictionary>
    		<ResourceDictionary.MergedDictionaries>
    			<ResourceDictionary Source="/LaserTag.Common;Component/Themes/Generic.xaml"/>
    		</ResourceDictionary.MergedDictionaries>
    		<Style x:Key="ColorPickerStyle"
    			TargetType="{x:Type common:ColorPicker}">
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="{x:Type common:ColorPicker}">
    						<Border Width="{TemplateBinding Width}"
    							Height="{TemplateBinding Height}"
    							Background="{TemplateBinding Background}"
    							BorderBrush="{TemplateBinding BorderBrush}"
    							BorderThickness="{TemplateBinding BorderThickness}">
    							<Grid Margin="{TemplateBinding Padding}">
    								<Grid.ColumnDefinitions>
    									<ColumnDefinition Width="*" />
    									<ColumnDefinition Width="Auto" />
    									<ColumnDefinition Width="Auto" />
    								</Grid.ColumnDefinitions>
    								<Grid.RowDefinitions>
    									<RowDefinition Height="Auto" />
    									<RowDefinition />
    								</Grid.RowDefinitions>
    								<Border Grid.Column="0"
    									Grid.Row="1"
    									CornerRadius="9,9,9,9"
    									BorderThickness="0,0,0,0">
    									<Border.Effect>
    										<DropShadowEffect Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"
    											BlurRadius="15"
    											ShadowDepth="0"
    											Opacity="1" />
    									</Border.Effect>
    									<Border x:Name="border"
    										BorderThickness="1,1,1,1"
    										CornerRadius="8,8,8,8"
    										Background="#FF000000"
    										BorderBrush="#FF000000">
    										<Border x:Name="PART_ColorDetail"
    											Cursor="Cross"
    											HorizontalAlignment="Stretch"
    											VerticalAlignment="Stretch"
    											CornerRadius="8,8,8,8">
    											<Border.Background>
    												<DrawingBrush Opacity="{Binding Value, ElementName=opacitySlider}">
    													<DrawingBrush.Drawing>
    														<DrawingGroup>
    															<GeometryDrawing>
    																<GeometryDrawing.Geometry>
    																	<RectangleGeometry Rect="0,0,100,100" />
    																</GeometryDrawing.Geometry>
    																<GeometryDrawing.Brush>
    																	<SolidColorBrush Color="{Binding SelectedColor, ElementName=PART_ColorSlider}" />
    																</GeometryDrawing.Brush>
    															</GeometryDrawing>
    															<GeometryDrawing>
    																<GeometryDrawing.Geometry>
    																	<RectangleGeometry Rect="0,0,100,100" />
    																</GeometryDrawing.Geometry>
    																<GeometryDrawing.Brush>
    																	<LinearGradientBrush EndPoint="0.5,0"
    																		StartPoint="0.5,1">
    																		<GradientStop Color="#FF000000"
    																			Offset="0" />
    																		<GradientStop Color="{Binding SelectedColor, ElementName=PART_ColorSlider}"
    																			Offset="1" />
    																	</LinearGradientBrush>
    																</GeometryDrawing.Brush>
    															</GeometryDrawing>
    															<DrawingGroup>
    																<DrawingGroup.OpacityMask>
    																	<LinearGradientBrush EndPoint="1,0.5"
    																		StartPoint="0,0.5">
    																		<GradientStop Color="#FF000000"
    																			Offset="0" />
    																		<GradientStop Color="#00000000"
    																			Offset="1" />
    																	</LinearGradientBrush>
    																</DrawingGroup.OpacityMask>
    																<GeometryDrawing>
    																	<GeometryDrawing.Geometry>
    																		<RectangleGeometry Rect="0,0,100,100" />
    																	</GeometryDrawing.Geometry>
    																	<GeometryDrawing.Brush>
    																		<LinearGradientBrush EndPoint="0.5,1"
    																			StartPoint="0.5,0">
    																			<GradientStop Color="#FFFFFFFF"
    																				Offset="0" />
    																			<GradientStop Color="#FF000000"
    																				Offset="1" />
    																		</LinearGradientBrush>
    																	</GeometryDrawing.Brush>
    																</GeometryDrawing>
    															</DrawingGroup>
    														</DrawingGroup>
    													</DrawingBrush.Drawing>
    												</DrawingBrush>
    											</Border.Background>
    											<Path x:Name="PART_ColorMarker"
    												Fill="#00FFFFFF"
    												Stroke="#FFFFFFFF"
    												StrokeThickness="2"
    												Cursor="Cross">
    												<Path.Data>
    													<EllipseGeometry RadiusX="7"
    														RadiusY="7" />
    												</Path.Data>
    												<Path.Effect>
    													<DropShadowEffect ShadowDepth="0" />
    												</Path.Effect>
    											</Path>
    										</Border>
    									</Border>
    								</Border>
    								<common:SpectrumSlider x:Name="PART_ColorSlider"
    									Margin="5,0,0,0"
    									Style="{DynamicResource SpectrumSliderStyle}"
    									Grid.Column="1"
    									Grid.Row="1"
    									IsMoveToPointEnabled="True"
    									IsSnapToTickEnabled="False"
    									Maximum="360"
    									Value="0" />
    							</Grid>
    						</Border>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="SpectrumSliderStyle"
    			TargetType="{x:Type common:SpectrumSlider}">
    			<Setter Property="Orientation"
    				Value="Vertical" />
    			<Setter Property="Stylus.IsPressAndHoldEnabled"
    				Value="False" />
    			<Setter Property="Background"
    				Value="#00FFFFFF" />
    			<Setter Property="Foreground"
    				Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
    			<Setter Property="Minimum"
    				Value="0" />
    			<Setter Property="Maximum"
    				Value="100" />
    			<Setter Property="TickFrequency"
    				Value="0.001" />
    			<Setter Property="IsSnapToTickEnabled"
    				Value="True" />
    			<Setter Property="IsDirectionReversed"
    				Value="False" />
    			<Setter Property="Value"
    				Value="1" />
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="{x:Type common:SpectrumSlider}">
    						<Border Height="{TemplateBinding Height}"
    							Background="{TemplateBinding Background}"
    							BorderBrush="{TemplateBinding BorderBrush}"
    							BorderThickness="{TemplateBinding BorderThickness}">
    							<Grid>
    								<Grid.RowDefinitions>
    									<RowDefinition Height="*" />
    								</Grid.RowDefinitions>
    								<Grid.ColumnDefinitions>
    									<ColumnDefinition Width="Auto" />
    									<ColumnDefinition MinWidth="{TemplateBinding MinWidth}"
    										Width="Auto" />
    									<ColumnDefinition Width="Auto" />
    								</Grid.ColumnDefinitions>
    								<Border x:Name="PART_TrackBackground"
    									Margin="10,0,10,0"
    									Width="15"
    									Grid.Column="1">
    									<Rectangle x:Name="PART_SpectrumDisplay"
    										Stretch="Fill"
    										VerticalAlignment="Stretch"
    										RadiusY="1.707"
    										RadiusX="1.707"
    										Stroke="#FF000000" />
    								</Border>
    								<Canvas HorizontalAlignment="Center"
    									Width="4"
    									Grid.Column="1">
    									<Rectangle x:Name="PART_SelectionRange"
    										Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
    										Width="2"
    										Visibility="Hidden"
    										Canvas.Left="1" />
    								</Canvas>
    								<Track x:Name="PART_Track"
    									Grid.Column="1">
    									<Track.IncreaseRepeatButton>
    										<RepeatButton Command="Slider.IncreaseLarge">
    											<RepeatButton.Style>
    												<Style TargetType="{x:Type RepeatButton}">
    													<Setter Property="OverridesDefaultStyle"
    														Value="True" />
    													<Setter Property="IsTabStop"
    														Value="False" />
    													<Setter Property="Focusable"
    														Value="False" />
    													<Setter Property="Background"
    														Value="#00FFFFFF" />
    													<Setter Property="Template">
    														<Setter.Value>
    															<ControlTemplate TargetType="{x:Type RepeatButton}">
    																<Border Background="{TemplateBinding Background}" />
    															</ControlTemplate>
    														</Setter.Value>
    													</Setter>
    												</Style>
    											</RepeatButton.Style>
    										</RepeatButton>
    									</Track.IncreaseRepeatButton>
    									<Track.Thumb>
    										<common:ColorThumb x:Name="Thumb"
    											Height="20"
    											ThumbColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"
    											Style="{DynamicResource ColorThumbStyle}">
    											<common:ColorThumb.PointerOutlineBrush>
    												<LinearGradientBrush EndPoint="0.5,1"
    													StartPoint="0.5,0">
    													<GradientStop Color="#FF000000"
    														Offset="1" />
    													<GradientStop Color="#FF707070"
    														Offset="0" />
    												</LinearGradientBrush>
    											</common:ColorThumb.PointerOutlineBrush>
    										</common:ColorThumb>
    									</Track.Thumb>
    									<Track.DecreaseRepeatButton>
    										<RepeatButton Command="Slider.DecreaseLarge">
    											<RepeatButton.Style>
    												<Style TargetType="{x:Type RepeatButton}">
    													<Setter Property="OverridesDefaultStyle"
    														Value="True" />
    													<Setter Property="IsTabStop"
    														Value="False" />
    													<Setter Property="Focusable"
    														Value="False" />
    													<Setter Property="Background"
    														Value="#00FFFFFF" />
    													<Setter Property="Template">
    														<Setter.Value>
    															<ControlTemplate TargetType="{x:Type RepeatButton}">
    																<Border Background="{TemplateBinding Background}" />
    															</ControlTemplate>
    														</Setter.Value>
    													</Setter>
    												</Style>
    											</RepeatButton.Style>
    										</RepeatButton>
    									</Track.DecreaseRepeatButton>
    								</Track>
    							</Grid>
    						</Border>
    						<ControlTemplate.Triggers>
    							<Trigger Property="IsSelectionRangeEnabled"
    								Value="True">
    								<Setter Property="Visibility"
    									TargetName="PART_SelectionRange"
    									Value="Visible" />
    							</Trigger>
    							<Trigger Property="Width"
    								Value="Auto">
    								<Setter Property="MinWidth"
    									Value="21" />
    							</Trigger>
    							<Trigger Property="Height"
    								Value="Auto">
    								<Setter Property="MinHeight"
    									Value="104" />
    							</Trigger>
    						</ControlTemplate.Triggers>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="ColorThumbStyle"
    			TargetType="{x:Type common:ColorThumb}">
    			<Setter Property="PointerOutlineBrush"
    				Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" />
    			<Setter Property="PointerOutlineThickness"
    				Value="2" />
    			<Setter Property="Foreground"
    				Value="{x:Null}" />
    			<Setter Property="ThumbColor"
    				Value="#00FFFFFF" />
    			<Setter Property="Background"
    				Value="#00FFFFFF" />
    			<Setter Property="Height"
    				Value="5" />
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="{x:Type common:ColorThumb}">
    						<Border Background="{TemplateBinding Background}"
    							BorderBrush="{TemplateBinding BorderBrush}"
    							BorderThickness="{TemplateBinding BorderThickness}">
    							<Grid Margin="0,0,0,0"
    								Width="35"
    								Height="20">
    								<Rectangle x:Name="rectangle"
    									Stroke="{TemplateBinding PointerOutlineBrush}"
    									StrokeThickness="{TemplateBinding PointerOutlineThickness}"
    									RadiusX="2"
    									RadiusY="2"
    									Width="35"
    									Height="20"
    									d:LayoutOverrides="VerticalMargin">
    									<Rectangle.Effect>
    										<DropShadowEffect ShadowDepth="0"
    											BlurRadius="10"
    											Color="#FF000000" />
    									</Rectangle.Effect>
    									<Rectangle.Fill>
    										<SolidColorBrush Color="{Binding ThumbColor, RelativeSource={RelativeSource TemplatedParent}}" />
    									</Rectangle.Fill>
    								</Rectangle>
    								<Path Stretch="Fill"
    									StrokeThickness="1"
    									Margin="0.5,0.5,0.5,6.125"
    									Data="M2.5,0.5 L31.5,0.5 C32.604568,0.5 33.5,1.3954306 33.5,2.5 L33.5,9.2220211 33.331329,9.3218632 C29.604603,11.472235 23.482779,12.875 16.5625,12.875 10.17455,12.875 4.4669409,11.679745 0.69547558,9.804533 L0.5,9.7049398 0.5,2.5 C0.5,1.3954306 1.3954306,0.5 2.5,0.5 z"
    									Stroke="#00000000">
    									<Path.Fill>
    										<LinearGradientBrush EndPoint="0.5,1"
    											StartPoint="0.5,0">
    											<GradientStop Color="#FFFFFFFF"
    												Offset="0" />
    											<GradientStop Color="#00FFFFFF"
    												Offset="1" />
    										</LinearGradientBrush>
    									</Path.Fill>
    								</Path>
    							</Grid>
    						</Border>
    						<ControlTemplate.Triggers>
    							<Trigger Property="IsEnabled"
    								Value="False">
    								<Setter Property="Foreground"
    									Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
    							</Trigger>
    						</ControlTemplate.Triggers>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="TargetReticleStyle" TargetType="{x:Type common:TargetReticle}">
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="{x:Type common:TargetReticle}">
    						<Canvas x:Name="PART_ReticleTargetArea">
    							<Ellipse x:Name="PART_Reticle" Fill="#55FF0000" Stroke="White" StrokeThickness="2" Width="25" Height="25"/>
    							<common:ImageSequencer Width="100" Height="100" SourceFolder="E:\Users\jmoney\Documents\Visual Studio 2008\Projects\HJT\WPFLaserTag\LaserTag.Shell\Resources\ImageSequences\SparkSequence" FrameTrailCount="2"/>
    						</Canvas>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<DataTemplate x:Key="TabHeaderStyle">
    			<Grid Background="Red"/>
    		</DataTemplate>
    		<Style x:Key="TabItemFocusVisual">
    			<Setter Property="Control.Template">
    				<Setter.Value>
    					<ControlTemplate>
    						<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="3,3,3,1" SnapsToDevicePixels="true"/>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0,1" StartPoint="0,0">
    			<GradientStop Color="#EAF6FD" Offset="0.15"/>
    			<GradientStop Color="#D9F0FC" Offset=".5"/>
    			<GradientStop Color="#BEE6FD" Offset=".5"/>
    			<GradientStop Color="#A7D9F5" Offset="1"/>
    		</LinearGradientBrush>
    		<SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/>
    		<SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/>
    		<SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/>
    		<SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/>
    		<Style x:Key="VisionSetupTabItemStyle" TargetType="{x:Type TabItem}">
    			<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
    			<Setter Property="Foreground" Value="Black"/>
    			<Setter Property="Padding" Value="6,1,6,1"/>
    			<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
    			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    			<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    			<Setter Property="VerticalContentAlignment" Value="Stretch"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="{x:Type TabItem}">
    						<Grid SnapsToDevicePixels="true">
    							<Border x:Name="Bd" BorderThickness="1,1,1,0" Padding="{TemplateBinding Padding}">
    								<ContentPresenter x:Name="Content" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True"/>
    							</Border>
    						</Grid>
    						<ControlTemplate.Triggers>
    							<Trigger Property="IsMouseOver" Value="true"/>
    							<Trigger Property="IsSelected" Value="true">
    								<Setter Property="Panel.ZIndex" Value="1"/>
    								<Setter Property="Foreground" Value="#FFD000FA"/>
    							</Trigger>
    							<MultiTrigger>
    								<MultiTrigger.Conditions>
    									<Condition Property="IsSelected" Value="false"/>
    									<Condition Property="IsMouseOver" Value="true"/>
    								</MultiTrigger.Conditions>
    							</MultiTrigger>
    							<Trigger Property="TabStripPlacement" Value="Bottom">
    								<Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1"/>
    							</Trigger>
    							<Trigger Property="TabStripPlacement" Value="Left">
    								<Setter Property="BorderThickness" TargetName="Bd" Value="1,1,0,1"/>
    							</Trigger>
    							<Trigger Property="TabStripPlacement" Value="Right">
    								<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
    							</Trigger>
    							<MultiTrigger>
    								<MultiTrigger.Conditions>
    									<Condition Property="IsSelected" Value="true"/>
    									<Condition Property="TabStripPlacement" Value="Top"/>
    								</MultiTrigger.Conditions>
    								<Setter Property="Margin" Value="-2,-2,-2,-1"/>
    								<Setter Property="Margin" TargetName="Content" Value="0,0,0,1"/>
    							</MultiTrigger>
    							<MultiTrigger>
    								<MultiTrigger.Conditions>
    									<Condition Property="IsSelected" Value="true"/>
    									<Condition Property="TabStripPlacement" Value="Bottom"/>
    								</MultiTrigger.Conditions>
    								<Setter Property="Margin" Value="-2,-1,-2,-2"/>
    								<Setter Property="Margin" TargetName="Content" Value="0,1,0,0"/>
    							</MultiTrigger>
    							<MultiTrigger>
    								<MultiTrigger.Conditions>
    									<Condition Property="IsSelected" Value="true"/>
    									<Condition Property="TabStripPlacement" Value="Left"/>
    								</MultiTrigger.Conditions>
    								<Setter Property="Margin" Value="-2,-2,-1,-2"/>
    								<Setter Property="Margin" TargetName="Content" Value="0,0,1,0"/>
    							</MultiTrigger>
    							<MultiTrigger>
    								<MultiTrigger.Conditions>
    									<Condition Property="IsSelected" Value="true"/>
    									<Condition Property="TabStripPlacement" Value="Right"/>
    								</MultiTrigger.Conditions>
    								<Setter Property="Margin" Value="-1,-2,-2,-2"/>
    								<Setter Property="Margin" TargetName="Content" Value="1,0,0,0"/>
    							</MultiTrigger>
    							<Trigger Property="IsEnabled" Value="false">
    								<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemDisabledBackground}"/>
    								<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemDisabledBorderBrush}"/>
    								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    							</Trigger>
    						</ControlTemplate.Triggers>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
        
    	</ResourceDictionary>
        
    </UserControl.Resources>
    <Grid Margin="15">
        <StackPanel Orientation="Vertical" Margin="5,30,5,5">
            <Grid Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center">
        		<Border
        			BorderThickness="8"
                    HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center">
        			<Border.BorderBrush>
        				<LinearGradientBrush EndPoint="0.813,0.835" StartPoint="0.187,0.165">
        					<GradientStop Color="#FFC3C3C3" Offset="1"/>
        					<GradientStop Color="White"/>
        				</LinearGradientBrush>
        			</Border.BorderBrush>
        			<Grid Width="Auto"
        				Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center">
        				<Grid.ColumnDefinitions>
        					<ColumnDefinition Width="Auto" />
        				</Grid.ColumnDefinitions>
                        <Image x:Name="postProcessedImage"
                               Stretch="Fill"
                               Source="{Binding PostProcessedBitmap}"
                               MinHeight="240"
                               MinWidth="352"
                               OpacityMask="{x:Null}"
                               d:LayoutOverrides="Height"
                               Grid.Column="1"
                               Grid.Row="0"
                               Height="240"
                               Width="352"
                               RenderOptions.BitmapScalingMode="LowQuality">
                            <!-- Image.RenderTransform>
                                <ScaleTransform ScaleX="1" CenterY="120"
                                                ScaleY="-1" CenterX="176" />
                            </Image.RenderTransform -->
                        </Image>
                    </Grid>
        		</Border>
        		<common:AnimatedTabControl Margin="0,-35,0,0" Foreground="White">
        			<TabItem Header="Target" Margin="0" Padding="0" Foreground="White" Style="{DynamicResource VisionSetupTabItemStyle}" FontWeight="Bold" FontSize="16">
        				<Grid HorizontalAlignment="Right" Width="350" Margin="0,-17,0,-11">
        					<common:TargetReticle ReticleCenter="{Binding TrackedObjectCenter}"
        						TargetAreaSize="{Binding TargetAreaSize, Mode=TwoWay}"
        						Width="{Binding ActualWidth, ElementName=postProcessedImage}"
        						Height="{Binding ActualHeight, ElementName=postProcessedImage}"
        						Margin="0"
        						HorizontalContentAlignment="Stretch"
        						VerticalContentAlignment="Stretch"
        						ClipToBounds="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        				</Grid>
        			</TabItem>
        			<TabItem Header="Vision Target Area" Margin="0" Padding="0" Foreground="White" Style="{DynamicResource VisionSetupTabItemStyle}" FontWeight="Bold" FontSize="16">
        				<Grid Margin="-12,-16,-12,-12">
        					<common:AreaSelection SelectionArea="{Binding TargetSearchArea, Mode=TwoWay}" TargetAreaSize="{Binding TargetAreaSize}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Width="{Binding ActualWidth, ElementName=postProcessedImage, Mode=Default}" Height="{Binding ActualHeight, ElementName=postProcessedImage, Mode=Default}"/>
        				</Grid>
        			</TabItem>
        		</common:AnimatedTabControl>
        	</Grid>
        	<StackPanel HorizontalAlignment="Center" Margin="-23,9,0,0" VerticalAlignment="Center" Orientation="Horizontal">
        		<Canvas Width="100" Height="100">
        			<Grid Width="26.506" Height="28.373" Canvas.Left="50.243" Canvas.Top="-16.334">
        				<TextBlock Margin="2,8,-2.001,-14.127" FontSize="21.333" FontWeight="Bold" Foreground="White" Text="H" TextWrapping="Wrap"/>
        				<TextBlock HorizontalAlignment="Right" Margin="0,0,-1.003,-10.502" VerticalAlignment="Bottom" Height="20.373" Opacity="0.5" FontSize="9.333" Foreground="White" TextWrapping="Wrap"><Run Text="ue"/><LineBreak/><Run Text=""/></TextBlock>
        			</Grid>
        			<Grid Width="26.506" Height="28.373" Canvas.Left="50.159" Canvas.Top="1.873">
        				<TextBlock Margin="5,5,1.506,-21.627" FontSize="21.333" FontWeight="Bold" Foreground="White" Text="S" TextWrapping="Wrap" Width="20" Height="45"/>
        				<TextBlock HorizontalAlignment="Right" Margin="0,0,-74,-8.334" FontSize="9.333" Foreground="White" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="83.4" Height="20.373" Opacity="0.5" Text="aturation" d:LayoutOverrides="HorizontalAlignment"/>
        			</Grid>
        			<Grid Width="26.506" Height="28.373" Canvas.Left="50.159" Canvas.Top="21.873">
        				<TextBlock Margin="5,-2,1.506,-14.627" FontSize="21.333" FontWeight="Bold" Foreground="White" Text="L" TextWrapping="Wrap" Width="20" Height="45"/>
        				<TextBlock HorizontalAlignment="Right" Margin="0,10.668,-73,-2.668" FontSize="9.333" Foreground="White" TextWrapping="Wrap" Width="83.4" Text="uminance" d:LayoutOverrides="HorizontalAlignment" Opacity="0.5"/>
        			</Grid>
        		</Canvas>
        		<StackPanel Margin="0" Orientation="Vertical" HorizontalAlignment="Center" d:LayoutOverrides="GridBox">
        			<StackPanel Orientation="Horizontal">
        				<Slider Minimum="0"
        					Width="100"
        					Maximum="359"
        					Value="{Binding HueMinimum}"
        					ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" Margin="10,3" Style="{DynamicResource MediaTimeSliderStyle}" />
        				<Slider Minimum="0"
        					Width="100"
        					Maximum="359"
        					Value="{Binding HueMaximum}"
        					ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" Margin="10,3" Style="{DynamicResource MediaTimeSliderStyle}" />
        			</StackPanel>
        			<StackPanel Orientation="Horizontal">
        				<Slider Minimum="0"
        					Width="100"
        					Maximum="1"
        					LargeChange="0.1"
        					SmallChange="0.01"
        					Value="{Binding SaturationMinimum}"
        					ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" Margin="10,3" Style="{DynamicResource MediaTimeSliderStyle}" />
        				<Slider Minimum="0"
        					Width="100"
        					Maximum="1"
        					LargeChange="0.1"
        					SmallChange="0.01"
        					Value="{Binding SaturationMaximum}"
        					ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" Margin="10,3" Style="{DynamicResource MediaTimeSliderStyle}" />
        			</StackPanel>
        			<StackPanel Orientation="Horizontal">
        				<Slider Minimum="0"
        					Width="100"
        					Maximum="1"
        					LargeChange="0.1"
        					SmallChange="0.01"
        					Value="{Binding LuminanceMinimum}"
        					ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" Margin="10,3" Style="{DynamicResource MediaTimeSliderStyle}" />
        				<Slider Minimum="0"
        					Width="100"
        					Maximum="1"
        					LargeChange="0.1"
        					SmallChange="0.01"
        					Value="{Binding LuminanceMaximum}"
        					ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" Margin="10,3" Style="{DynamicResource MediaTimeSliderStyle}" />
        			</StackPanel>
        		</StackPanel>
        	</StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
